const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const ArtSchema = new Schema({
  //分类
  class_name: {
    type: String,
    required: true,
    //唯一的
    unique: true
  },
  detail: {
    type: String
  },
  blog_num: {
    type: Number
  },
  //自动获取创建时间和更新时间
},{timestamps: {createdAt: 'create_time', updatedAt: 'update_time'}})
module.exports = Class = mongoose.model('classarticles', ArtSchema)